package cn.newhopedairy.sim.infrastructure.db.po;

import com.baomidou.mybatisplus.annotation.TableName;
import cn.newhopedairy.common.po.SuperPo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 访问端点资源表
 *
 * @author Neo.Li
 * @since 2021-01-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("endpoint")
@ApiModel(value="EndpointPo对象", description="访问端点资源表")
public class EndpointPo extends SuperPo {


    @ApiModelProperty(value = "父资源ID，一级资源为0")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value = "资源名称")
    @TableField("endpoint_name")
    private String endpointName;

    @ApiModelProperty(value = "资源URI")
    @TableField("endpoint_uri")
    private String endpointUri;

    @ApiModelProperty(value = "授权(多个用逗号分隔，如：user:list,user:create)")
    @TableField("perms")
    private String perms;

    @ApiModelProperty(value = "资源类型 0：目录 1：菜单 2：按钮")
    @TableField("type")
    private Boolean type;

    @ApiModelProperty(value = "资源图标")
    @TableField("icon")
    private String icon;

    @ApiModelProperty(value = "排序值，越小越靠前")
    @TableField("sort")
    private Long sort;

    @ApiModelProperty(value = "状态  0：禁用 1：正常")
    @TableField("status")
    private Boolean status;


}
